45d376
@@ -198,20 +198,25 @@
public class RequestMappingHandlerAdapter implements HandlerAdapter, Application
 						.onErrorResume(exceptionHandler)));
 	}
 
-	private Mono<HandlerResult> handleException(Throwable ex, HandlerMethod handlerMethod,
+	private Mono<HandlerResult> handleException(Throwable exception, HandlerMethod handlerMethod,
 			BindingContext bindingContext, ServerWebExchange exchange) {
 
 		Assert.state(this.methodResolver != null, "Not initialized");
 
-		InvocableHandlerMethod invocable = this.methodResolver.getExceptionHandlerMethod(ex, handlerMethod);
+		InvocableHandlerMethod invocable = this.methodResolver.getExceptionHandlerMethod(exception, handlerMethod);
 		if (invocable != null) {
 			try {
 				if (logger.isDebugEnabled()) {
 					logger.debug("Invoking @ExceptionHandler method: " + invocable.getMethod());
 				}
 				bindingContext.getModel().asMap().clear();
-				Throwable cause = ex.getCause() != null ? ex.getCause() : ex;
-				return invocable.invoke(exchange, bindingContext, cause, handlerMethod);
+				Throwable cause = exception.getCause();
+				if (cause != null) {
+					return invocable.invoke(exchange, bindingContext, exception, cause, handlerMethod);
+				}
+				else {
+					return invocable.invoke(exchange, bindingContext, exception, handlerMethod);
+				}
 			}
 			catch (Throwable invocationEx) {
 				if (logger.isWarnEnabled()) {
@@ -219,7 +224,7 @@
public class RequestMappingHandlerAdapter implements HandlerAdapter, Application
 				}
 			}
 		}
-		return Mono.error(ex);
+		return Mono.error(exception);
 	}
 
 }
